package com.fy.tt.executor.node.sentence.complexStmt;


import com.fy.tt.executor.node.script.ComplexStmt;
import com.fy.tt.executor.node.script.SimpleStmt;
import com.fy.tt.executor.node.sentence.simpleStmt.JudgeStmt;

public class IfStmt extends ComplexStmt {

    public JudgeStmt judgeStmt;
//    public List<SimpleStmt> simpleStmts;
    public SimpleStmt simpleStmt;

    @Override
    public boolean run(String methodName) {

        System.out.println("judgeStmt:"+judgeStmt.toString());

        Boolean JudgeRes =judgeStmt.run(methodName);
        if(JudgeRes){
//            for (SimpleStmt simpleStmt : simpleStmts) {
//                simpleStmt.run(methodName);
//            }
            simpleStmt.run(methodName);

        }else{
            return false;
        }
        return super.run(methodName);
    }
}
